package com.c.ctgproject.base

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel

/**
 *作者:LiBW
 *创建日期: 2020/9/3
 *描述: ViewModel基类
 */
open class BaseViewModel : ViewModel() {
    protected val mError: MutableLiveData<String> = MutableLiveData()
    val error: LiveData<String> get() = mError

    fun setError(msg: String) {
        mError.value = msg
    }
}